<template>
  <div class="home">
    <h2>query----{{ $route.query.name }}----{{ $route.query.age }}</h2>
    <h2>params----{{ $route.params.name }}----{{ $route.params.age }}</h2>
    <h2>home----{{ name }}----{{ age }}</h2>
  </div>
</template>
<script>
export default {
  props: ['name', 'age']
  // data() {
  //   return {
  //     name: this.$route.params.name,
  //     age: this.$route.params.age
  //   }
  // }
  // data: () => ({
  //   name: '',
  //   age: ''
  // }),
  // created() {
  //   this.name = this.$route.params.name
  //   this.age = this.$route.params.age
  // }
}
</script>
<style lang="scss" scoped></style>
